CC = gcc
CFLAGS = -Wall -g -pthread
LDFLAGS = -pthread

all: server client

server: server.o queue.o
	$(CC) $(LDFLAGS) -o server server.o queue.o

client: client.o queue.o
	$(CC) $(LDFLAGS) -o client client.o queue.o

server.o: server.c common.h
	$(CC) $(CFLAGS) -c server.c

client.o: client.c common.h
	$(CC) $(CFLAGS) -c client.c

queue.o: queue.c common.h
	$(CC) $(CFLAGS) -c queue.c

clean:
	rm -f *.o server client

.PHONY: all clean 